<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core"
                template="/templates/template.xhtml">
    <ui:define name="title">出口信息</ui:define>
    <ui:define name="content">
        <h:form id="applicationForm">
            <div class="topbar clearfix"
                 style="background: -webkit-linear-gradient(top,#f6f7f9 0,#ebedf0 100%);">
                <p:toolbar>
                    <f:facet name="right">
                        <p:commandButton value="复制" icon="fa fa-copy"
                                         actionListener="#{loanApplicationExportInfoBean.onCopyApplication()}"
                                         process="@this"
                                         update="@form"
                                         rendered="#{loanApplicationExportInfoBean.isView()}"/>
                        <p:commandButton value="编辑" icon="fa fa-edit"
                                         actionListener="#{loanApplicationExportInfoBean.changeStatusToEdit()}"
                                         process="@this"
                                         update="@form"
                                         rendered="#{loanApplicationExportInfoBean.isView()}"/>
                        <p:commandButton value="保存" icon="fa fa-save"
                                         actionListener="#{loanApplicationExportInfoBean.onSave}"
                                         rendered="#{loanApplicationExportInfoBean.isNotView()}"
                                         update="@form"/>
                        <p:commandButton value="取消" icon="fa fa-reply"
                                         actionListener="#{loanApplicationExportInfoBean.changeStatusToView()}"
                                         rendered="#{loanApplicationExportInfoBean.isEdit() and loanApplicationExportInfoBean.$.id != null}"
                                         process="@this"
                                         update="@form"/>
                        <p:commandButton icon="fa fa-reply-all" value="返回"
                                         action="#{loanApplicationExportInfoBean.onReturn(currentUserBean.back)}"
                                         process="@this"/>
                    </f:facet>
                </p:toolbar>
            </div>
            <p:tabView id="applicationTabView" style="background: #edf0f5; padding-top: 50px;">
                <p:ajax event="tabChange" listener="#{loanApplicationExportInfoBean.onChangeTab}"/>
                <p:tab title="基础信息">
                    <ui:include src="basic-info.xhtml"/>
                </p:tab>
                <p:tab title="交互信息">
                    <ui:include src="interaction-info.xhtml"/>
                </p:tab>
                <p:tab title="其他信息">
                    <ui:include src="other-info.xhtml"/>
                </p:tab>
            </p:tabView>
        </h:form>
    </ui:define>
</ui:composition>